import { useEffect,useState } from 'react';
import MyComponent from './MyComponent'

function App() {
  const [staticfaction_level,setStaticfaction_level] = useState(301);
  useEffect(() =>{
    console.log('App 更新了')
    setTimeout(() => {
      setStaticfaction_level(301)
    },3000)
  },[])
  return (
    <div className="App">
      <input type="range"
        min="0"
        max="500"
        value={staticfaction_level}
        onChange={(event) => setStaticfaction_level(+event.target.value)}
        />
      <MyComponent level={staticfaction_level}/>
    </div>
  )
}

export default App
